package com.iplant.basic.service.basicenum.bpm;

import com.iplant.base.po.enums.BaseEnum;

public enum TaskQueryType implements BaseEnum {
    /**
     * 待办
     */
    ToHandle(1, "待办"),
    /**
     * 已办
     */
    Handled(4, "已办"),
    /**
     * 发起
     */
    Sended(2, "发起");

    private int value;
    private String label;
    private String remark;

    TaskQueryType(int value, String label) {
        this.value = value;
        this.label = label;
    }

    TaskQueryType(int value, String label, String remark) {
        this.value = value;
        this.label = label;
        this.remark = remark;
    }

    /**
     * 通过 value 的数值获取枚举实例
     *
     * @param val
     * @return
     */
    public static TaskQueryType getEnumType(int val) {
        for (TaskQueryType type : TaskQueryType.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return ToHandle;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
